package org.jet.emall.common.util;

import java.lang.reflect.Field;

/**
 * @author xiaozai
 * @version 1.0
 * @date 2020-04-10 11:00
 */
public abstract class ObjectUtils {

    public static boolean isAnyNullFields(Object object) {

        Field[] fields = object.getClass().getDeclaredFields();
        try {
            for (Field field : fields) {
                field.setAccessible(true);
                if(field.get(object) == null){
                  return true;
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
            return false;
        }
        return false;
    }
}
